package com.debconf;

import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class main extends Activity {
	
	final private int INFO_DIALOG = 0;
	
    private OnClickListener iButtonListener = new OnClickListener() {
		@Override
		public void onClick(View v) {
			showDialog(INFO_DIALOG);
			//Log.d("vea test","aaassssssssssssssssssssssssssssssssssssssssssssssss");
		}
	};

	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button ibutton = (Button)findViewById(R.id.iButton);
        ibutton.setOnClickListener(iButtonListener);
        
    }
    
    protected Dialog onCreateDialog(int id) {
    		switch (id) {
    		case INFO_DIALOG:
    			dialog = new Dialog(this);
            	dialog.setContentView(R.layout.dialog);
            	dialog.setTitle("Android DebConf App");
            	TextView text = (TextView) dialog.findViewById(R.id.text);
            	text.setText("Feel free to join the project:\n\n http://code.google.com/p/debconf/ \n\n Contact me: vedran@nardev.org");
//            	ImageView image = (ImageView) dialog.findViewById(R.id.image);
//            	image.setImageResource(R.drawable.ibutton);
    			return dialog;
    		}
    		return null;
    };
	private Dialog dialog = null;
}